﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;

namespace ArgLauncher2
{
    static class Program
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        /// 

        //private List<String> _args;
        private static bool _alertingEnabled;

        [STAThread]
        static void Main()
        {
            _alertingEnabled = true;
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new Form1());
        }

        public static void WriteError(String caption, String text, Exception exception = null, bool forceShow = false)
        {
            if ((_alertingEnabled | forceShow) == true)
            {
                String exMessage = String.Empty;
                if (exception != null)
                {
                    exMessage = exception.ToString();
                }
                MessageBox.Show(String.Concat(text, "\n\n", exMessage), caption);
            }

        }
    }
}
